package cn.com.yiqi.wsc.dao.role;

import cn.com.artemis.framework.base.commons.persistence.CrudDao;
import cn.com.yiqi.wsc.entity.role.RoleUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleUserDao extends CrudDao<RoleUser> {


    /**
     * 根据userId删除记录
     *
     * @param userId
     * @return
     */
    Integer deleteByUserId(@Param("userId") Integer userId);


    /**
     * 批量添加
     *
     * @param user
     * @return
     */
    Integer insertBatch(@Param("userRoles") List<RoleUser> user);

}